package com.iro.blog.Service;

import com.iro.blog.pojo.Blog;
import com.iro.blog.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogsService {
    Blog getBlog(Long id);//根据id获取某个博客

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);//分页查询

    Page<Blog> listBlog(Pageable pageable);//对博客分页

    Page<Blog> listBlog(String query, Pageable pageable);//前台搜索业务

    Page<Blog> listBlog( Long tagId, Pageable pageable);//根据查询的标签进行分页

    Blog saveBlog(Blog blog);//新增博客

    Blog updateBlog(Long id,Blog blog);//更新博客

    void deteleBlog(Long id);//删除博客

    List<Blog> listRecommendBlogTop(Integer size);//标签页面的点击标签显示效果

    Blog getAndConvert(Long id);

    Map<String,List<Blog>> archivesBlog();//归档页面

    Long countBlog();//计算总的博客数量
}
